package com.jtny.nytb.equipment.service;


import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.jtny.nytb.equipment.dto.EquipmentDTO;
import com.jtny.nytb.equipment.dto.PowerMonitorDTO;
import com.jtny.nytb.equipment.dto.device.EquipmentGatewayRelationDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


/**
 * @author 智慧能源中心 - 车智斌
 * @package com.jtny.nytb.energymonitor.equipment.service
 * @fileName PowerMonitorService.java
 * @createTime 2023年10月11日 09:16
 * @Copyright© 2023 jtny
 * 江投能源技术研究院 版权所有
 */
@Api(value = "配电监测Service接口", tags = "配电监测Service接口")
@ResponseBody
public interface PowerMonitorService {

    @ApiOperation("查询配电监测信息")
    @ApiOperationSupport(order = 1)
    @PostMapping("/queryAll")
    List<PowerMonitorDTO> queryAll();

    @ApiOperation("根据配电检测信息查询普通设备信息")
    @ApiImplicitParam(name = "powerMonitorDTO", value = "配电监测DTO对象", required = true, paramType = "query")
    @ApiOperationSupport(order = 2)
    @PostMapping("/queryEquipments")
    List<EquipmentDTO> queryEquipments(@RequestBody PowerMonitorDTO powerMonitorDTO);

    @ApiOperation("根据区域id查询网关设备信息")
    @ApiImplicitParam(name = "id", value = "区域id", required = true, paramType = "query")
    @ApiOperationSupport(order = 3)
    @PostMapping("/queryGWEquipmentsByAreaId")
    List<EquipmentDTO> queryGWEquipmentsByAreaId(@RequestBody Long id);

    @ApiOperation("查询所有设备信息")
    @ApiOperationSupport(order = 4)
    @PostMapping("/queryAllEquipments")
    List<EquipmentDTO> queryAllEquipments();

    @ApiOperation("查询正常设备信息")
    @ApiImplicitParam(name = "list", value = "区域点集合", required = true, paramType = "List<Long>")
    @ApiOperationSupport(order = 5)
    @PostMapping("/queryEquipmentsByArea")
    List<EquipmentDTO> queryEquipmentsByArea(@RequestBody List<Long> list);

    @ApiOperation("查询所有网关设备信息")
    @ApiOperationSupport(order = 6)
    @PostMapping("/queryGWEquipments")
    List<EquipmentDTO> queryGWEquipments();

    @ApiOperation("查询所有普通设备信息")
    @ApiOperationSupport(order = 7)
    @PostMapping("/queryNormalEquipments")
    List<EquipmentDTO> queryNormalEquipments();

    @ApiOperation("网关设备通过设备标识获取正常设备标识")
    @ApiImplicitParam(name = "dockIdentifier", value = "设备对接标识", required = true, paramType = "String")
    @ApiOperationSupport(order = 8)
    @PostMapping("/queryNormalIdByGWId")
    List<EquipmentGatewayRelationDTO> queryNormalIdByGWId(@RequestBody String dockIdentifier);

    @ApiOperation("查询网关设备信息")
    @ApiImplicitParam(name = "list", value = "区域点集合", required = true, paramType = "List<Long>")
    @ApiOperationSupport(order = 9)
    @PostMapping("/queryGWEquipmentsByArea")
    List<EquipmentDTO> queryGWEquipmentsByArea(@RequestBody List<Long> list);

    @ApiOperation("获取所有网关汇集设备信息")
    @ApiOperationSupport(order = 10)
    @PostMapping("/queryEquipmentsByGW")
    List<EquipmentDTO> queryEquipmentsByGW();
}
